Terminal devices utilizing TCP (Transmission Control Protocol) for sending and receiving data, such as mobile telephones or personal computer devices having data communication functions are in widespread use. TCP is a type of communications protocol in the transport layer of an OSI reference model, and is used for achieving highly reliable communications. Under TCP, to ensure reliable communication, when a segment transmitted from a transmitting device is not received by a receiving device, it is retransmitted. A segment is a data block which includes a sequence of numbers indicating when it was transmitted from a transmitting device relative to other segments (hereinafter, referred to as “sequence number”). Hereinafter, the condition in which a segment transmitted from a transmitting device is not received by a receiving device will be referred to as “segment loss”.
A transmitting device for transmitting segments using TCP detects a segment loss on the basis of the following two conditions. The first condition is to determine whether, after a predetermined period of time (hereinafter referred to as “retransmission timeout interval”) has elapsed, a signal acknowledging receipt of the originally transmitted segment is received from a receiving device. In a case that an acknowledgement is not received during the retransmission timeout interval, the transmitting device determines that a segment loss has occurred and retransmits the segment. The retransmission of a segment on the basis of the first condition will be referred to as “retransmission caused by timeout”. The second condition is to determine whether a predetermined number of (for example, three) duplicate acknowledgements are sent from a receiving device. A duplicate acknowledgement is transmitted from a receiving device to notify a transmitting device of a sequence number of a segment which it expects to receive, when segments are not received in an expected order. If a transmitting device receives duplicate acknowledgements within a predetermined time, the transmitting device determines that a segment loss has occurred and immediately retransmits the segment indicated by the duplicate acknowledgements without waiting for a retransmission timeout interval to elapse. A retransmission in accordance with the second condition is referred to as “fast retransmission”.
In communications conducted under TCP, as described above, a transmitting device detects a segment loss and retransmits the lost segment. Further, when a segment loss is detected, congestion control for avoiding transmission of a large amount of segments to a network and flow control for avoiding the transmission of segments in such a volume as to exceed the buffer capacity of a receiving device are performed. The flow control and the congestion control will be described in detail later.
A transmitting device using TCP to send a segment stores five parameters, snd_max, snd_nxt, snd_una, snd_wnd, and snd_cwnd. Congestion control is performed by transmitting a number of segments identified on the basis of those parameters. FIG. 8 is a diagram illustrating the interrelations of these five parameters. snd_max shows a sequence number (for example, sequence number “6” in FIG. 8) of a segment including the highest sequence number of segments that have already been transmitted. snd_nxt shows a sequence number (for example, sequence number “7” in FIG. 8) of a segment to be transmitted or retransmitted next. snd_una shows the lowest sequence number (for example, sequence number “4” in FIG. 8) of segments whose acknowledgement is not received. snd_cwnd shows bytes representing a number of data segments that may be transmitted by the transmitting device without an acknowledgement for previously transmitted segments being received. A segment transmitted by a transmitting device within a round trip time is shown between snd_una and snd_una+min (snd_wnd, and snd_cwnd) in FIG. 8. snd_wnd represents an advertised window size notified by a receiving device, and the value of the advertised window size indicates an available receiving buffer space in a receiving device, and is represented in bytes. A round trip time is a time necessary for a transmitting device to transmit a segment and receive an acknowledgement for the segment. The number of segments to be transmitted in a round trip time is indicated by a “congestion window size”. A congestion window size thus computed never exceeds snd_wnd (an advertised window size); accordingly, a number of data segments transmitted to a receiving device never exceeds available buffer space in the receiving device. A transmitting device using TCP performs flow control by adjusting the number of transmitted segments; the segments being transmitted on the basis of an advertised window size.
A transmitting device performs congestion control by updating congestion window size snd_cwnd to an appropriate value. Congestion control performed by the transmitting device will now be explained. snd_cwnd represents a maximum segment size as an initial value. One data segment is represented by a unit called Maximum Segment Size (hereinafter referred to as “MSS”), where the default size of 1 MSS is determined as 512 bytes; and snd_cwnd has, for example, 1 MSS as its initial value. Each time an acknowledgement for a transmitted segment is received, the transmitting device increases a value of snd_cwnd in accordance with a slow start algorithm (R. W. Stevens. TCP Slow Start, Congestion Avoidance, Fast Recovery Algorithms. RFC2001, January 1997.; non-patent document 1) where a number of data segments transmitted is incremented exponentially, 1MSS, 2MSS, 4MSS, and 8 MSS, until the value reaches a predetermined threshold (e.g., 65,535 bytes). When the value of snd_cwnd reaches the threshold, the transmitting device increases the value of snd_cwnd by 1MSS. This process occurs each time a round trip time lapses until a segment loss is detected.
When detecting a retransmission timeout, the transmitting device updates the threshold at half of the value of the congestion window size and then set the value of snd_cwnd to 1 MSS. The transmitting device then rewrites snd_nxt to snd_una and starts retransmission from a segment indicated by snd_nxt, and increases the value represented by snd_cwnd using the above described slow start algorithm, each time receiving an acknowledgement for the retransmitted segment.
TCP typically performs the above explained operations, segment retransmission, congestion control, and flow control, when transmitting a segment. Some other techniques to improve efficiency in communication using TCP have been proposed (for example, Japanese patent laid-open publication No. 2000-78195; patent document 1, S. Floyd and et al. The New-Reno Modification to TCP's Fast Recovery Algorithm. RFC2582, April 1999.; non-patent document 2, and K. Igarashi et al. Adoption of Delayed ACK for TCP in Wireless Environments. Shingaku Gihou IN2002-111, 2002; non-patent document 3).
Patent document 1 discloses a technique for achieving efficient data transmission using a communication conforming to a TCP version called Reno supporting a SACK option (hereinafter referred to as “Reno-TCP”). SACK option is information for notifying a transmitting device of a segment received by a receiving device after a segment loss occurs. According to a technique described in patent document 1, in a case that a packet loss is notified by SACK information included in a received packet, a transmitting device immediately retransmits the lost packet only when the value set in snd_cwnd is lower than a predetermined threshold. By such a technique, erroneous retransmission caused by transposition of packet order is suppressed and efficient data transmission in communications conforming to Reno-TCP is achieved even under conditions where packet loss frequently occurs.
A TCP version called NewReno (hereinafter, referred to as “NewReno-TCP ”) is disclosed in non-patent document 2. A transmitting device transmitting a segment using NewReno-TCP performs the above described fast retransmission and retransmits a lost segment using an algorithm called fast recovery. In a case that a transmitting device operates using a fast recovery algorithm, the number of segments retransmitted within one round-trip time is limited to “1”. This is because, a segment already received by a receiving device should not be retransmitted. To cope with a situation in which several segments are lost, the transmitting device continues retransmission of a segment using a fast recovery algorithm until receiving an acknowledgement for a segment having a maximum sequence number among the previously transmitted segments. This is because, in a case that several segments are lost, a receiving device does not transmit an acknowledgement for a segment having a maximum sequence number until the receiving device receives all segments.
Non-patent document 3 discloses a technique for efficiently retransmitting a lost segment as a result of switching over of an access router at a receiving device (hereinafter, referred to as “handover”) in a communication using mobile IP. Specifically, according to the technique disclosed in non-patent document 3, in a case that a segment loss occurs as a result of handover, a receiving device transmits to a transmitting device an acknowledgement with “0” set as the above-described advertised window size, thereby notifying the transmitting device that a segment loss has occurred as a result of handover. On receiving the acknowledgement, the transmitting device suspends clocking of retransmission timeout interval for a transmitted segment, and for the transmitted segments for which the transmitting device has not received an acknowledgement, determines that the segment loss is caused by insufficient buffer space in receiving device (hereinafter, such a state of a transmitting device is called “Persistent State”).
The transmitting device then updates the above described snd_nxt to snd_una and retransmits a segment determined to be lost. When receiving from the receiving device an acknowledgement indicating the cancellation of Persistent State (specifically, an acknowledgement indicating that the value of advertised window size is other than “0”), the transmitting device ends the above described Persistent State and restarts transmitting a segment represented by snd_nxt.
The significant problem in the technique described in non-patent document 2 is that because of the segment retransmission in response to a retransmission timeout, a throughput in an overall communication system is likely to decrease. As shown in FIG. 9, for example, a transmitting device is assumed to transmit 12 segments among which the fourth to eighth segments are lost; the lost segments are retransmitted in response to retransmission timeout. The transmitting device executes the above described slow start algorithm to update the value represented by snd_cwnd, thereby starting the retransmission from the fourth segment. Specifically, the transmitting device firstly updates the value represented by snd_cwnd to 1MSS and retransmits only one segment, that is, the fourth segment. When receiving an acknowledgement for the fourth segment, the transmitting device updates the value represented by snd_cwnd to 2MSS and then retransmits the fifth and the sixth segment. When receiving an acknowledgement for the sixth segment, the transmitting device updates the value represented by snd_cwnd to 4MSS and then retransmits four segments, that is the seventh to tenth segments. Among the four segments, the ninth and the tenth segments are already received by the receiving device; the segments are not required to be retransmitted. According to this technique, however, a transmitting device cannot detect a segment already received by the receiving device; thus, segments which do not need to be retransmitted are also retransmitted. In this way, when a segment including a segment already received by the receiving device is transmitted, the receiving device transmits the above-described duplicate acknowledgement (in FIG. 9, a duplicate acknowledgement requiring the retransmission of the thirteenth segment). In response to receiving an acknowledgement for the seventh segment (an acknowledgement requiring the transmission of the eighth segment), the transmitting device further transmits the eleventh to eighteenth segments. As a result, the receiving device transmits a duplicate acknowledgement for three segments including the ninth to eleventh segments indicating the transmission of the thirteenth segment. In the subsequent. process, the transmitting device receives three duplicate acknowledgements requiring the transmission of the thirteenth segment, and mistakenly retransmits the thirteenth segment.
According to the technique disclosed in non-patent document 3, in a case of receiving an acknowledgement with “0” set as advertised window size, among the transmitted segments, every segment for which an acknowledgement has not been received is considered to be lost and retransmission is performed. In actuality, however, not all of the segments are lost. For this reason, the problem of the technique disclosed in the non-patent document 3 is that the retransmission of a segment causes a decrease in throughput in an overall communication system.
The explained problems, according to the techniques disclosed in both the non-patent document 2 and the non-patent document 3, are caused because a transmitting device is not able to detect a segment received normally by a receiving device after a segment loss occurs. According to the technique disclosed in patent document 1, a transmitting device is able to detect an already received segment by referring to SACK OPTION. However, the technique disclosed in the patent document 1 cannot be directly applied to the non-patent documents, because the techniques disclosed in both the non-patent document 2 and non-patent document 3 are not supported on the basis of SACK OPTION.
The present invention has been presented to overcome the stated problems and has an object to provide a technique in which, at the time of transmitting a lost segment again to a transmitting device, a receiving device is prohibited from retransmitting an already received segment.